<template>
	<page-body>
		<view class="page">
			<view class="flex benben-position-layout flex flex-wrap align-center yuxuandan_flex_0"
				:style="{height:(88+StatusBarRpx)+'rpx',paddingTop:StatusBarRpx+'rpx', }">
				<view class='flex flex-wrap align-center justify-between flex-sub yuxuandan_fd0_0'>
					<view class='flex flex-wrap align-center yuxuandan_fd0_0_c0' @tap.stop="handleJumpDiy"
						data-type="back" data-url="1">
						<text class='fu-iconfont2  yuxuandan_fd0_0_c0_c0'>&#xE794;</text>
					</view>
					<view class='flex flex-wrap align-stretch justify-center'>
						<text class='yuxuandan_fd0_0_c1_c0'>我的预选单</text>
					</view>
					<view class='flex flex-wrap align-center justify-end yuxuandan_fd0_0_c0'>
					</view>
				</view>

			</view>
			<view :style="{height: (88+StatusBarRpx)+'rpx'}"></view>
			<!---flex布局flex布局开始-->
			<view class="flex benben-flex-layout flex-wrap align-center">
				<view>
					<benben-flex-tabs class-name='yuxuandan_benbenTabsfd1_0' v-model="tabsTypefd1_0"
						ref="benben_tabsfd1_0" select-mark="benben_tabsfd1_0" key="benben_tabsfd1_0"
						:open-title-type='false' :open-sticky='true' :top='0' :is-show-content='false'
						:scrollspy='false' :tabs-info.sync="tabsInfofd1_0" @change="changeTabs">
						<scroll-view @scroll="tabsInfofd1_0.scrollX = $event.detail.scrollLeft" id="benben_tabsfd1_0"
							class="benben-tabs" style="width:750rpx" :scroll-x="true"
							:scroll-left.sync="tabsInfofd1_0.moveX" scroll-with-animation="all .3s ease">
							<view class="benben-tabs-content" id="benben_tabsfd1_0-content">
								<view id="benben_tabsfd1_0-title"
									class="benben-tabs-title flex flex align-center justify-around">
									<view v-for="(item,index) in tabList" :key="index"
										:class="{ 'checkTitlefd1_0': tabsTypefd1_0 == item.aid, 'flex flex-wrap align-center': true }"
										@tap="tabsTypefd1_0 = item.aid" :id="`benben_tabsfd1_0-title-item-${item.aid}`">
										<text>{{item.name}}</text>
									</view>
								</view>
								<view :style="{ left: tabsInfofd1_0.lineleft, maxWidth: tabsInfofd1_0.lineWidth ,}"
									id="benben_tabsfd1_0-line"
									class="benben-tabs-line flex benben-flex-tabs-line yuxuandan_linefd1_0"></view>
							</view>
						</scroll-view>
					</benben-flex-tabs>
				</view>
			</view>
			<!---flex布局flex布局结束-->
			<!---flex布局flex布局开始-->
			<view class="flex benben-flex-layout flex-wrap align-center yuxuandan_flex_2">
				<view class='flex flex-wrap align-stretch yuxuandan_fd2_0' v-for="(item,index) in houseArr"
					:key="index" @tap.stop="handleJumpDiy" data-type="navigateTo"
					:data-url="`/pages/mine/rentalPropertydetails/rentalPropertydetails?aid=${item.aid}`">
					<view class='flex flex-wrap align-center yuxuandan_fd2_0_c0'>
						<image class='yuxuandan_fd2_0_c0_c0' mode="aspectFit" :src='item.cover'></image>
					</view>
					<view class='flex flex-wrap align-stretch self-center justify-center flex-sub'>
						<view class='flex flex-wrap align-center' style="width: 100%;">
							<text class='yuxuandan_fd2_0_c1_c0_c0'
								style="text-align: left;">{{item.address}}{{item.building_number}}</text>
						</view>
						<view class='flex flex-wrap align-center justify-between yuxuandan_fd2_0_c1_c1'>
							<text class='yuxuandan_fd2_0_c1_c1_c0'>2室.次卧 丨96.36㎡丨南 北</text>
							<image class='yuxuandan_fd2_0_c1_c1_c1' mode="aspectFit" :src='STATIC_URL+"116.png"'>
							</image>
						</view>
						<view class='flex flex-wrap align-stretch yuxuandan_fd2_0_c1_c2'>
							<text class='yuxuandan_fd2_0_c1_c2_c0'>{{item.expected_rent}}</text>
							<text class='yuxuandan_fd2_0_c1_c2_c1'>元/月</text>
						</view>
						<view class='flex flex-wrap align-stretch yuxuandan_fd2_0_c1_c1'>
							<view
								class='flex flex-direction flex-wrap align-center self-center justify-center yuxuandan_fd2_0_c1_c3_c0'>
								<text class='yuxuandan_fd2_0_c1_c3_c0_c0'>近地铁</text>
							</view>
							<view
								class='flex flex-direction flex-wrap align-center self-center justify-center yuxuandan_fd2_0_c1_c3_c0'>
								<text class='yuxuandan_fd2_0_c1_c3_c0_c0'>随时可看</text>
							</view>
						</view>
					</view>
				</view>
				<view class="flex justify-center" v-if="houseArr.length==0" style="width: 100%;">
					<fu-empty-ui></fu-empty-ui>
				</view>
			</view>

			<!---flex布局flex布局结束-->


		</view>
	</page-body>
</template>
<script>
	export default {
		components: {},


		data() {
			return {
				"tabsInfofd1_0": {
					lineleft: '',
					lineWidth: '',
					moveX: 0,
					scrollX: 0,
					PageScrollX: 0
				},
				"tabsTypefd1_0": "1",
				houseArr: [],
				tabList: [],
			};
		},
		computed: {

		},
		watch: {},
		onLoad(options) {
			this.getTabList()
			this.getSearchList()
		},
		onUnload() {

		},
		onReady() {

		},
		onShow() {

		},
		onHide() {

		},
		onResize() {

		},
		onPullDownRefresh() {

		},
		onReachBottom(e) {

		},
		onPageScroll(e) {

		},
		methods: {
			changeTabs(){
				this.getSearchList()
			},
			getTabList() {
				this.$api.post('/m6752/66f9046a00f6a').then(res => {
					if (res.data.code == 1) {
						this.tabList = res.data.data
						this.tabsTypefd1_0 = res.data.data[0].aid
					}
				})
			},
			getSearchList() {
				this.$api.post('/m6752/66f9076be8e2e', {
					housecate_id: this.tabsTypefd1_0
				}).then(res => {
					if (res.data.code == 1) {
						this.houseArr = res.data.data.data
						console.log(this.houseArr);
					}
				})
			},
		}
	};
</script>
<style lang="scss" scoped>
	.page {
		width: 100vw;
		overflow-x: hidden;
		min-height: calc(100vh - var(--window-bottom));
		background: rgba(248, 248, 248, 1);
		background-size: 100% auto;
	}

	.yuxuandan_flex_0 {
		background: #fff;
		width: 750rpx;
		height: 88rpx;
		overflow: hidden;
		z-index: 10;
		top: 0rpx;
		background-size: 100% auto !important;
	}

	.yuxuandan_fd0_0_c1_c0 {
		font-size: 36rpx;
		font-weight: 500;
		color: #333333;
		line-height: 50rpx;
	}

	.yuxuandan_fd0_0_c0_c0 {
		font-size: 36rpx;
		color: #333;
	}

	.yuxuandan_fd0_0_c0 {
		width: 120rpx;
	}

	.yuxuandan_fd0_0 {
		padding: 0rpx 32rpx 0rpx 32rpx;
	}

	.yuxuandan_linefd1_0 {
		background: #FC5F80;
		width: 30rpx;
		height: 6rpx;
		top: 75rpx;
		background-size: 100% auto !important;
		border-radius: 3rpx 3rpx 3rpx 3rpx;
	}

	.checkTitlefd1_0 {
		font-weight: 500 !important;
		font-size: 30rpx !important;
		color: #333 !important;
		background-color: rgba(255, 255, 255, 1) !important;
	}

	::v-deep .yuxuandan_benbenTabsfd1_0 {
		background: #fff;
		width: 750rpx;
		height: 90rpx;
		white-space: nowrap;
		text-align: center;
		color: #999999;
		font-size: 30rpx;
	}

	.yuxuandan_flex_2 {
		padding: 0rpx 24rpx 0rpx 24rpx;
	}

	.yuxuandan_fd2_0_c1_c3_c0_c0 {
		color: #EA4040;
		font-size: 20rpx;
		font-weight: 400;
	}

	.yuxuandan_fd2_0_c1_c3_c0 {
		background: rgba(234, 64, 64, 0.1);
		border-radius: 6rpx 6rpx 6rpx 6rpx;
		height: 30rpx;
		padding: 0rpx 8rpx 0rpx 8rpx;
		margin: 0rpx 8rpx 0rpx 0rpx;
	}

	.yuxuandan_fd2_0_c1_c2_c1 {
		font-size: 24rpx;
	}

	.yuxuandan_fd2_0_c1_c2_c0 {
		font-size: 32rpx;
	}

	.yuxuandan_fd2_0_c1_c2 {
		color: rgba(234, 55, 39, 1);
		font-weight: 600;
		margin: 16rpx 0rpx 0rpx 0rpx;
		width: 100%;
	}

	.yuxuandan_fd2_0_c1_c1_c1 {
		width: 36rpx;
		height: 36rpx;
		border-radius: 0rpx 0rpx 0rpx 0rpx;
	}

	.yuxuandan_fd2_0_c1_c1_c0 {
		color: #666666;
		font-size: 22rpx;
		font-weight: 400;
	}

	.yuxuandan_fd2_0_c1_c1 {
		width: 100%;
		margin: 16rpx 0rpx 0rpx 0rpx;
	}

	.yuxuandan_fd2_0_c1_c0_c0 {
		color: #333333;
		font-size: 32rpx;
		font-weight: 500;
	}

	.yuxuandan_fd2_0_c0_c0 {
		width: 100%;
		height: 100%;
		border-radius: 16rpx;
	}

	.yuxuandan_fd2_0_c0 {
		width: 216rpx;
		height: 192rpx;
		border-radius: 16rpx;
		margin: 0rpx 20rpx 0rpx 0rpx;
	}

	.yuxuandan_fd2_0 {
		background: #FFFFFF;
		width: 100%;
		margin: 24rpx 0rpx 0rpx 0rpx;
		border-radius: 16rpx 16rpx 16rpx 16rpx;
		padding: 24rpx;
	}
</style>